//
//  ChatContent.h
//  安好
//
//  Created by lianchuang on 14/10/30.
//  Copyright (c) 2014年 冯凯. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MyFMDB.h"
#import "YXJSON.h"
@interface ChatContent : NSObject
@property (nonatomic, strong) NSString *qid;
@property (nonatomic, strong) NSString *myuid;
@property (nonatomic, strong) NSString *messageType;
@property (nonatomic, strong) NSString *messageDirection;
@property (nonatomic, strong) NSString *action;
@property (nonatomic, strong) NSString *dateline;
@property (nonatomic, strong) NSString *message;
@property (nonatomic, strong) NSString *pic;
@property (nonatomic, strong) NSString *type;
@property (nonatomic, strong) NSString *uid;
@property (nonatomic, strong) NSString *username;
@property (nonatomic, strong) NSString *voice;
@property (nonatomic, strong) NSString *voicelength;
@property (nonatomic, strong) NSString *departmentname;
@property (nonatomic, strong) NSString *isQuestion;
@property (nonatomic, strong) NSString *method;
@property (nonatomic, strong) NSString *width;
@property (nonatomic, strong) NSString *heigth;
@property (nonatomic, strong) NSString *showTime;
@property (nonatomic, strong) NSData *imageData;
@property (nonatomic, strong) NSData *voiceData;
@property (nonatomic, strong) NSString *date;
@property (nonatomic, strong) NSString *isreferral;
@property (nonatomic, assign) NSInteger rid;
@property (nonatomic, strong) NSString *success;

- (id)initWithQid:(NSString *)qid AndMyuid:(NSString *)myuid AndMessageType:(NSString *)messageType AndMessageDirection:(NSString *)messageDirection AndAction:(NSString *)action AndDateLine:(NSString *)dateline AndMessage:(NSString *)message AndPic:(NSString *)pic AndType:(NSString *)type AndUid:(NSString *)uid AndUsername:(NSString *)username AndVoice:(NSString *)voice AndVoiceLength:(NSString *)voicelence AndDepartmentName:(NSString *)departmentname AndIsQuestion:(NSString *)isQuestion AndMethod:(NSString *)method AndWidth:(NSString *)width AndHeigth:(NSString *)heigth AndShowTime:(NSString *)showTime AndSuccess:(NSString *)success;
+ (BOOL)insertChatMessageItem:(id)message Andsuccess:(NSString *)success AndMessageDirection:(NSString *)index;
+(NSMutableArray *)readItemFromChatContentTable:(NSInteger)index count:(NSInteger)count withQid:(NSString *)qid;
+(NSMutableArray *)readItemFromChatContentTable:(NSInteger)index count:(NSInteger)count withUid:(NSString *)uid;
+(CGSize)downloadImageSizeWithURL:(id)imageURL;
+ (NSString *)readTheLastDate;
+ (BOOL)insertFirstIndex:(NSDictionary *)dict;
+ (BOOL)isreferral:(NSString *)qid AndDb:(FMDatabase *)dataBase;
@end
